package com.qingxin.cms.entity;

import java.sql.Timestamp;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.codehaus.jackson.annotate.JsonIgnore;
import org.hibernate.annotations.GenericGenerator;

/**
 * 信息反馈表
 */
@Entity
@Table(name = "feedback_msg")
public class FeedbackMsg extends com.qingxin.sys.entity.BaseEntity implements
		java.io.Serializable {
	private static final long serialVersionUID = -1718673494435438474L;
	// Fields

	private String feedbackId;
	private String parkId;
	private String source;
	private String content;
	private String contractPerson;
	private String contractPhone;
	private String show;
	private String replyContent;
	private String replyBy;
	private Date replyTime;
	private Date createTime;
	private Set<FeedbackMsgAttachment> feedbackMsgAttachments = new HashSet<>(0);

	// Constructors

	/** default constructor */
	public FeedbackMsg() {
	}

	/** full constructor */
	public FeedbackMsg(String parkId, String source, String content,
			String contractPerson, String contractPhone, String show,
			String replyContent, String replyBy, Timestamp replyTime,
			Timestamp createTime,
			Set<FeedbackMsgAttachment> feedbackMsgAttachments) {
		this.parkId = parkId;
		this.source = source;
		this.content = content;
		this.contractPerson = contractPerson;
		this.contractPhone = contractPhone;
		this.show = show;
		this.replyContent = replyContent;
		this.replyBy = replyBy;
		this.replyTime = replyTime;
		this.createTime = createTime;
		this.feedbackMsgAttachments = feedbackMsgAttachments;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "uuid.hex")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "feedback_id", unique = true, nullable = false, length = 32)
	public String getFeedbackId() {
		return this.feedbackId;
	}

	public void setFeedbackId(String feedbackId) {
		this.feedbackId = feedbackId;
	}

	@Column(name = "park_id", length = 32)
	public String getParkId() {
		return this.parkId;
	}

	public void setParkId(String parkId) {
		this.parkId = parkId;
	}

	@Column(name = "source", length = 50)
	public String getSource() {
		return this.source;
	}

	public void setSource(String source) {
		this.source = source;
	}

	@Column(name = "content", length = 500)
	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Column(name = "contract_person", length = 15)
	public String getContractPerson() {
		return this.contractPerson;
	}

	public void setContractPerson(String contractPerson) {
		this.contractPerson = contractPerson;
	}

	@Column(name = "contract_phone", length = 15)
	public String getContractPhone() {
		return this.contractPhone;
	}

	public void setContractPhone(String contractPhone) {
		this.contractPhone = contractPhone;
	}

	@Column(name = "show", length = 1)
	public String getShow() {
		return this.show;
	}

	public void setShow(String show) {
		this.show = show;
	}

	@Column(name = "reply_content", length = 500)
	public String getReplyContent() {
		return this.replyContent;
	}

	public void setReplyContent(String replyContent) {
		this.replyContent = replyContent;
	}

	@Column(name = "reply_by", length = 32)
	public String getReplyBy() {
		return this.replyBy;
	}

	public void setReplyBy(String replyBy) {
		this.replyBy = replyBy;
	}

	@Column(name = "reply_time", length = 23)
	public Date getReplyTime() {
		return this.replyTime;
	}

	public void setReplyTime(Timestamp replyTime) {
		this.replyTime = replyTime;
	}

	@Column(name = "create_time", length = 23)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Timestamp createTime) {
		this.createTime = createTime;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "feedbackMsg")
	@JsonIgnore
	public Set<FeedbackMsgAttachment> getFeedbackMsgAttachments() {
		return this.feedbackMsgAttachments;
	}

	public void setFeedbackMsgAttachments(
			Set<FeedbackMsgAttachment> feedbackMsgAttachments) {
		this.feedbackMsgAttachments = feedbackMsgAttachments;
	}

}